﻿/*
  Copyright © Alexander G. Bykin, Russia 2009-2010
  This source is subject to the Microsoft Public License (Ms-PL).
  Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
  All rights reserved.
*/

namespace GoogleVisualizationAPI
{
    using System.Collections.Generic;

    public class DataTable
    {
        #region Private Properties

        /// <summary>
        /// 
        /// </summary>
        private IList<DataColumn> _listOfDataColumn;

        /// <summary>
        /// 
        /// </summary>
        private IList<DataCell> _listOfDataCell;

        #endregion

        #region Public Properties

        /// <summary>
        /// 
        /// </summary>
        public IList<DataColumn> ListOfDataColumn
        {
            get
            {
                return this._listOfDataColumn;
            }
            set
            {
                this._listOfDataColumn = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public IList<DataCell> ListOfDataCell
        {
            get
            {
                return this._listOfDataCell;
            }
            set
            {
                this._listOfDataCell = value;
            }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataColumn"></param>
        public void AddDataColumn(DataColumn dataColumn)
        {
            if (this._listOfDataColumn != null && dataColumn != null)
            {
                this._listOfDataColumn.Add(dataColumn);
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataCell"></param>
        public void AddDataCell(DataCell dataCell)
        {
            if (this._listOfDataCell != null && dataCell != null)
            {
                this._listOfDataCell.Add(dataCell);
            }
        }

        #endregion

        #region Contructor

        public DataTable()
        {
            this._listOfDataCell = new List<DataCell>();
            this._listOfDataColumn = new List<DataColumn>();
        }

        #endregion
    }
}
